<route lang="jsonc" type="page">
{
  "layout": "default",
  "style": {
    "navigationStyle": "custom",
    "navigationBarTitleText": "商品详情"
  }
}
</route>

<script lang="ts" setup>

// 轮播图数据
import {getBannerAPI} from '@/api/goods'
const swiperList = ref([])
const current = ref(0)
let page = 1
// 跳转banber详情
const handleClick = (e:any) => {
  uni.navigateTo({
    url:`/pages/banner/index?title=${e.item.title}&attachments=${encodeURIComponent(JSON.stringify(e.item.attachments))}`,
  })
}
// 获取banner
const getBannerData = async () => {
  const res = await getBannerAPI(page)
}
</script>

<template>
  <view>
    <wd-navbar :bordered="false" fixed placeholder>
    <template #left>
      <view><text class="text-19px font-bold text-[#071110]">减脂商城</text> <text class="text-12px text-[#6c6a6a] mt-10">超划算·品质保障·品牌直发</text></view>
    </template>
  </wd-navbar>
  <view class="px-13">
    <!-- 轮播图 -->
     <view class="">
        <wd-swiper :list="swiperList" value-key="cover" autoplay height="292rpx" v-model:current="current" :indicator="{ type: 'dots-bar' }" @click="handleClick"></wd-swiper>
     </view>
  </view>
  </view>
</template>

<style lang="scss" scoped>
//
</style>
